package com.conote.mess;

import cn.hutool.core.collection.CollUtil;

import java.io.File;
import java.util.ArrayList;

/**
 解析yaml文件，创建目录
 */
public class DealYaml {
    public static void main(String[] args) {
        String property = System.getProperty("user.dir");
        ArrayList<String> strings = CollUtil.newArrayList(
                "a/a1",
                "a/a2",
                "a/a3",
                "b/b1",
                "b/b2/c1",
                "b/b2/c2",
                "b/b3"
        );
        strings.forEach(e -> {
            String path = property.concat("/output/").concat(e);
            boolean flag = new File(path).mkdirs();
            if (flag) {
                System.out.println("【" + path + "】创建成功");
            } else {
                System.out.println("【" + path + "】目录已存在，创建失败");
            }
        });
    }
}
